package com.forcht.common.domain;

import lombok.*;

import java.nio.channels.SocketChannel;
import java.util.List;

/**
 * Created by forcht on 2018/4/11.
 * 用户的信息
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class User {
    //用户名
    private String username;
    //用户密码
    private String password;
    //用户连接的通道
    private SocketChannel socketChannel;
    //是否在线
    private boolean isOnline;
    //好友
    private List<User> friends;
    //群聊
    private List<GroupChat> groupChats;

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", isOnline=" + isOnline +
                '}';
    }
}
